import { useAppStore } from "src/stores/app-store"
import type { Router, RouteLocationNormalizedLoaded } from "vue-router"


export const useAfterHandler = (router: Router, route: RouteLocationNormalizedLoaded) => {
  return {
    afterHandler: () => {
      const  {pageType, } = useAppStore()
      if (pageType === 'auth') {
        return router.replace({path: '/evaluateAuth', query: route.query})
      }
      router.replace({path: '/evaluate', query: route.query})
    }
  }
}
